package com.example.data.factory.entity.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 码表
 * </p>
 *
 * @author lhy
 * @since 2025-03-03
 */
@Getter
@Setter
@ApiModel(value = "Dict对象", description = "码表")
public class Dict implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("码表id，唯一标识，递增")
    @TableId(value = "dict_id", type = IdType.AUTO)
    private Integer dictId;

    @ApiModelProperty("码表编号，系统自动生成（字符“MZB”+5位数字“00001）")
    private String dictCode;

    @ApiModelProperty("码表名称")
    private String dictName;

    @ApiModelProperty("码表说明")
    private String description;

    @ApiModelProperty("0-未发布（草稿），1-已发布，2-已停用")
    private Byte status;

    private Byte deleted;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "YYYY-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime updateTime;
}
